////#include"ZhangQueue.h"
////ZhangQueue::ZhangQueue() {
////	this->length = 0;
////	this->head = new ZhangQueueNode;
////	this->tail = new ZhangQueueNode;
////	this->head->next = this->tail;
////	this->tail->prev = this->head;
////	this->head->prev = this->tail->next = nullptr;
////}
////ZhangQueue::~ZhangQueue() {
////	ZhangQueueNode* p = this->head;
////	while (this->head != nullptr)
////	{
////		this->head = this->head->next;
////		delete p;
////		p = this->head;
////	}
////}
////bool ZhangQueue::is_emptyQueue() {
////	return this->length == 0;
////}
////void ZhangQueue::PushQueue(int data) {
////	this->tail->data = data;
////	ZhangQueueNode* p = new ZhangQueueNode;
////	p->next = nullptr;
////	p->prev = this->tail;
////	this->tail->next = p;
////	this->tail = p;
////	this->length++;
////}
////int ZhangQueue::PopQueue() {
////	ZhangQueueNode* p = this->head->next;
////	this->head->next = p->next;
////	p->next->prev = this->head;
////	int res = p->data;
////	delete p;
////	this->length--;
////	return res;
////}
//#include"ZhangQueue.h"
//#include<iostream>
//template<typename T>
//ZhangQueue<T>::ZhangQueue() {
//	this->length = 0;
//	this->head = new ZhangQueueNode<T>;
//	this->tail = new ZhangQueueNode<T>;
//	this->head->next = this->tail;
//	this->tail->prev = this->head;
//	this->head->prev = this->tail->next = nullptr;
//}
//template<typename T>
//ZhangQueue<T>::~ZhangQueue() {
//	ZhangQueueNode<T>* p = this->head;
//	while (this->head != nullptr)
//	{
//		this->head = this->head->next;
//		delete p;
//		p = this->head;
//	}
//}
//template<typename T>
//bool ZhangQueue<T>::is_emptyQueue() {
//	return this->length == 0;
//}
//template<typename T>
//void ZhangQueue<T>::PushQueue(T data) {
//	this->tail->data = data;
//	ZhangQueueNode<T>* p = new ZhangQueueNode<T>;
//	p->next = nullptr;
//	p->prev = this->tail;
//	this->tail->next = p;
//	this->tail = p;
//	this->length++;
//}
//template<typename T>
//T ZhangQueue<T>::PopQueue() {
//	ZhangQueueNode<T>* p = this->head->next;
//	this->head->next = p->next;
//	p->next->prev = this->head;
//	T res = p->data;
//	delete p;
//	this->length--;
//	return res;
//}
//template<typename T>
//void ZhangQueue<T>::lPrintQueue() {
//	ZhangQueueNode<T>* p = this->head->next;
//	int count = 1;
//	while (p!=this->tail)
//	{
//		std::cout << p->data << "\t";
//		p = p->next;
//		count++; 
//		if (count % 10 == 0)std::cout << std::endl;
//	}
//}
//template<typename T>
//void ZhangQueue<T>::rPrintQueue() {
//	ZhangQueueNode<T>* p = this->tail->prev;
//	int count = 1;
//	while (p!=this->head)
//	{
//		std::cout << p->data << "\t";
//		p = p->prev;
//		count++;
//		if (count % 10 == 0)std::cout << std::endl;
//	}
//}
//template<typename T>
//int ZhangQueue<T>::getLength() {
//	return this->length;
//}